import Vue from "vue";
import VueI18n from "vue-i18n";
import Cookie from "js-cookie";
import elementEN from "element-ui/lib/locale/lang/en";
import elementZH from "element-ui/lib/locale/lang/zh-CN";
import elementJA from "element-ui/lib/locale/lang/ja";
import customEN from "./en";
import customZH from "./zh";

Vue.use(VueI18n);
export default new VueI18n({
  locale: Cookie.get("language") || "zh",
  messages: {
    en: { ...elementEN, ...customEN },
    zh: { ...elementZH, ...customZH },
    ja: { ...elementJA },
  },
});
